package bist.believeinstep.administrator.view;

import com.vaadin.annotations.Title;
import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.server.Sizeable;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.VerticalSplitPanel;

@SuppressWarnings("serial")
@Title("Administrator Manager")
public class ManagerView extends CustomComponent implements View{

	public static final String NAME = "";
	private VerticalSplitPanel vsPnlManager;
	private HorizontalSplitPanel hsPnlManager;
	private HeaderView headerView;
	
	public ManagerView() {
		initLayout();
		setCompositionRoot(vsPnlManager);
		initialize();
	}
	
	private void initialize() {
		this.setSizeFull();
		setCompositionRoot(vsPnlManager);
	}
	
	@SuppressWarnings("deprecation")
	private void initLayout(){
		vsPnlManager = new VerticalSplitPanel();
		vsPnlManager.setSplitPosition(30, Sizeable.UNITS_PIXELS);
		vsPnlManager.setLocked(true);
		vsPnlManager.setSizeFull();
		
		headerView = new HeaderView();
		vsPnlManager.addComponent(headerView);

		MenuView menuView = new MenuView();
		hsPnlManager = new HorizontalSplitPanel();
		hsPnlManager.setSplitPosition(20, Sizeable.UNITS_PERCENTAGE);
		hsPnlManager.setSizeFull();
		hsPnlManager.setLocked(false);
		
		hsPnlManager.addComponent(menuView);
		
		
		vsPnlManager.addComponent(hsPnlManager);
	}

	@Override
	public void enter(ViewChangeEvent event) {
		// TODO Auto-generated method stub
		
	}	
}
